import java.io.*;

/**
 * @Description TODO
 * @Author hhy
 * @Date 2020/10/19 11:35
 */
public class Test02 {
    public static void main(String[] args) throws IOException {
        File file = new File("a.jpg");
        if (!file.exists()) file.createNewFile();
        try (InputStream input = new FileInputStream("feixieer.jpg");
             OutputStream output = new FileOutputStream("a.jpg"))
        {
            input.transferTo(output); // transferTo的作用是
        }
    }
}
